//引入封装的公共的请求插件
import { GET, POST, UPLOAD } from "../../services/request";

export default {
  initAddress(data = {}) {
    return GET({
      url: "user/address/initAddress",
      params: data,
    });
  },
  initShop(data = {}) {
    return POST({
      url: "user/order/initShop",
      params: data,
    });
  },
  create(data = {}) {
    return POST({
      url: "user/order/create",
      params: data,
    });
  },
  initOrders(data = {}) {
    return GET({
      url: "user/order/initOrders",
      params: data,
    });
  },
  initOrderInfo(data = {}) {
    return GET({
      url: "user/order/initOrderInfo",
      params: data,
    });
  },
  cash(data = {}) {
    return POST({
      url: "user/order/cash",
      params: data,
    });
  },
  receiving(data = {}) {
    return POST({
      url: "user/order/receiving",
      params: data,
    });
  },
  delete(data = {}) {
    return POST({
      url: "user/order/delete",
      params: data,
    });
  },
  // TODO 图片上传 使用upload
  comment(data = {}) {
    return UPLOAD({
      url: "/user/order/comment",
      params: data,
    });
  },
};
